//
// Created by luzhan on 19-10-4.
//

#ifndef ENERGY_FINDER_ENERGY_HPP
#define ENERGY_FINDER_ENERGY_HPP
#include <vector>
#include <opencv2/opencv.hpp>

class Energy {
public:
    double target_x, target_y;
    cv::RotatedRect target_energy_armor;                //当前帧能量板的最小包围矩形
    std::vector<cv::Point> target_contour;              //当前帧能量板轮廓
    bool isFindTatgetArmor;                             //标志位：是否已找到当前帧中的能量板
    bool isFindCenterR;                                 //标志位：是否一直到当前帧中的风车中心R
    std::vector<cv::Point> energy_armor_centers[35];    //能量板中心点坐标队列
    cv::Point circle_center;                            //拟合圆圆心坐标
    double circle_radius;                               //拟合圆的半径
    cv::Point predicted_point;
private:
    static const int MINRADIUS = 80;
    static const int MAXRADIUS = 100;
    static const int ENERGY_MAXAREA = 1300;
    static const int ENERGY_MINAREA = 800;

public:
    Energy();
    ~Energy();
    bool findCurrentArmor(cv::Mat src);
    bool findCenterR(cv::Mat src);
    bool calculate();
private:
};


#endif //ENERGY_FINDER_ENERGY_HPP
